package com.zdpx.pxframework.seata.sqlparser.druid;

import io.seata.common.loader.LoadLevel;
import io.seata.sqlparser.SqlParserType;
import io.seata.sqlparser.util.JdbcConstants;

/**
 * 适配dm为已支持的oracle数据库
 *
 * @Description:
 * @Author: Cheng Xiaoxiao
 * @Date: 2021-04-22 9:13:18
 */
@LoadLevel(name = SqlParserType.SQL_PARSER_TYPE_DRUID)
public class DruidDelegatingDbTypeParser extends io.seata.sqlparser.druid.DruidDelegatingDbTypeParser {
    @Override
    public String parseFromJdbcUrl(String jdbcUrl) {
        String result = super.parseFromJdbcUrl(jdbcUrl);
        return "dm".equals(result) ? JdbcConstants.ORACLE : result;
    }
}
